﻿namespace MicroCloud.Systems.Entities
{
    /// <summary>
    /// 实体类：字典 基类
    /// </summary>
    public abstract class DictBase<TKey> : EntityBase<TKey>, ILockable, ICreatedTime
        where TKey : struct, IEquatable<TKey>
    {
        /// <summary>
        /// 获取或设置 字典编码
        /// </summary>
        [Required]
        [StringSize(StringSizeType.Code)]
        [DisplayName("字典编码")]
        public string Code { get; set; }

        /// <summary>
        /// 获取或设置 字典名称
        /// </summary>
        [Required]
        [DisplayName("字典名称")]
        [StringSize(StringSizeType.Name)]
        public string Name { get; set; }

        /// <summary>
        /// 获取或设置 字典备注
        /// </summary>
        [DisplayName("字典备注")]
        [StringSize(StringSizeType.Remark)]
        public string Remark { get; set; }

        #region 接口字段        
        /// <summary>
        /// 获取或设置 是否锁定
        /// </summary>
        [DisplayName("是否锁定")]
        public bool IsLocked { get; set; }

        /// <summary>
        /// 获取或设置 创建时间
        /// </summary>
        [DisplayName("创建时间")]
        public DateTime CreatedTime { get; set; }

        #endregion        
    }
}